5851a9b3f2c6acb65dcdbfc3d8febf55556c76e9,src/test/java/com/datalogics/pdf/samples/creation/CreatePdfFromImageTest.java,CreatePdfFromImageTest,testBmp,#,37

Before Change


    @Test
    public void testBmp() throws Exception {
        final File outputBmp = newOutputFileWithDelete(OUTPUT_BMP);
        CreatePdfFromImage.main(outputBmp.getCanonicalPath(), CreatePdfFromImage.INPUT_BMP);
        assertTrue(outputBmp.getPath() + " must exist after run", outputBmp.exists());
        checkImageExists(outputBmp);
    }

After Change



    @Test
    public void testBmp() throws Exception {
        final URL inputUrl = CreatePdfFromImage.class.getResource(CreatePdfFromImage.INPUT_BMP);
        final File outputBmp = newOutputFileWithDelete(OUTPUT_BMP);
        final URL outputUrl = outputBmp.toURI().toURL();

        CreatePdfFromImage.createPdfFromImageAndSave(inputUrl, outputUrl);

        assertTrue(outputBmp.getPath() + " must exist after run", outputBmp.exists());
        checkImageExists(outputBmp);